﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SPVisualDev.VSAddin
{
    public struct ConnectionDetailsStruct
    {
        public string Address { get; set; }
        public int Port { get; set; }
        public string UserName { get; set; }
        public string Password { get; set; }
        public bool UseInProc { get; set; }

        public override int GetHashCode()
        {
            string s = string.Empty;
            if (Address != null)
                s += Address + "_";

            s += Port.ToString() + "_";

            if (UserName != null)
                s += UserName + "_";

            if (Password != null)
                s += Password + "_";

            s += UseInProc.ToString();

            return s.GetHashCode();
        }
    }
}
